#include <stdio.h>

void print1();
void print2();
void print3();
void print4();


void print1()
{
    printf("hello printf1\n");
     print2();
}
void print2()
{
    printf("hello printf1\n");
    print3();
}
void print3()
{
    printf("hello printf1\n");

}
void print4()
{
    printf("hello printf1\n");

}


int addToTop(int top)
{
    
   int res = 0;
   int i = 1;
   for(; i <= top ;i++)
   {
       res +=i;

   }

   print1();

   return res;

}



int main()
{
    
     printf("debug begin\n");

      int top = 100;
      int sum = addToTop(top);


     printf("sum : %d\n",sum);


     printf("debug end\n");

    return 0;

}
